<template>
    <div>
      <image-upload ref="upload" :urlList="urlList" :multiple="true" :limitCount="60"></image-upload>
      <p v-show="this.urls.length > 0">图片地址:{{urls}}</p>
    </div>
</template>

<script>
  import ImageUpload from './Common/ImageUpload'
  export default {
    name: 'UpImage',
    data(){
      return{
        urlList:[],
        urls:[]
      }
    },
    components:{
      ImageUpload
    },
    watch:{
      urlList(){
        // var i = 0
        var urls = new Array()
        for (let i = 0, len = this.urlList.length; i < len; i++) {
          var obj = this.urlList[i]
          urls.push("https://supimage.miniprogramhacker.cn/"+obj.qiniuName)
          // console.log("index is " +i)
          // console.log(obj.qiniuName)
          // i++
        }
        this.urls = urls
      }
    }
  }
</script>

<style scoped>

</style>
